package com.performanceManagement.pojo;


import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelIgnore;
import cn.afterturn.easypoi.excel.annotation.ExcelTarget;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;


@Data   //get、set、toString方法
@AllArgsConstructor //有参构造
@NoArgsConstructor //无参构造
@Entity(name = "EmployeeInformation")
@ExcelTarget("员工信息表")
public class EmployeeInformation implements Serializable {


    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Excel(name = "Id")
    private Integer eId;

    @Excel(name = "姓名")
    @Column(nullable = false,length=20)
    private String eName;

    @ExcelIgnore
    @Excel(name = "性别")
//    @Column(nullable = false,length=20)
    private String eSex;

    @ExcelIgnore
    @Excel(name = "电话")
//    @Column(nullable = false,length=11)
    private String eTel;

    @ExcelIgnore
    @Excel(name = "部门")
//    @Column(nullable = false,length=20)
    private String eDepartment;

    @ExcelIgnore
    @Excel(name = "职位")
//    @Column(nullable = false,length=20)
    private String ePosition;

    @ExcelIgnore
    @Excel(name = "任职状态")
//    @Column(nullable = false,length=20)
    private String ePostState;

    @ExcelIgnore
    @Excel(name = "入职时间")
//    @Column(nullable = false)
    private Date eHiredate;

    @ExcelIgnore
    @Excel(name = "离职时间")
//    @Column(nullable = true)
    private Date eLeavedate;

//    @OneToMany(mappedBy = "employeeInformation")  //一对多,设定对应关系
//    private List<PerformanceManagement> performanceManagements;


    public Integer geteId() {
        return eId;
    }

    public void seteId(Integer eId) {
        this.eId = eId;
    }

    public String geteName() {
        return eName;
    }

    public void seteName(String eName) {
        this.eName = eName;
    }

    public String geteSex() {
        return eSex;
    }

    public void seteSex(String eSex) {
        this.eSex = eSex;
    }

    public String geteTel() {
        return eTel;
    }

    public void seteTel(String eTel) {
        this.eTel = eTel;
    }

    public String geteDepartment() {
        return eDepartment;
    }

    public void seteDepartment(String eDepartment) {
        this.eDepartment = eDepartment;
    }

    public String getePosition() {
        return ePosition;
    }

    public void setePosition(String ePosition) {
        this.ePosition = ePosition;
    }

    public String getePostState() {
        return ePostState;
    }

    public void setePostState(String ePostState) {
        this.ePostState = ePostState;
    }

    public Date geteHiredate() {
        return eHiredate;
    }

    public void seteHiredate(Date eHiredate) {
        this.eHiredate = eHiredate;
    }

    public Date geteLeavedate() {
        return eLeavedate;
    }

    public void seteLeavedate(Date eLeavedate) {
        this.eLeavedate = eLeavedate;
    }
}
